home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 118_01.zip / MISC.BDS < prev    next >
Text File  |  1993-06-03  |  1KB  |  77 lines

  1. /* Miscellaneous routines for Software Tools
  2.  * source:  misc.bds
  3.  * version: July 26, 1981
  4.  */
  5.  
  6. #include tools.h
  7.  
  8. /* routines on this file:
  9.  
  10.     cant    error    query
  11.     
  12. */    
  13.  
  14. /*  query - print usage message if user has typed '?' */
  15.  
  16. query (mesg)
  17. char *mesg;
  18. {
  19.  
  20.     char *p;
  21.  
  22.     p = getarg(1);
  23.     if ( p [0] == '?' && p [1] == EOS) {
  24.         error (mesg);
  25.     }
  26. }
  27.  
  28. /*  cant - print "file:  can't open" and terminate execution */
  29.  
  30. cant (file)
  31. char *file;
  32. {
  33.     putlin ("Can't open:  ", ERROUT);
  34.     putlin (file, ERROUT);
  35.     endst();
  36. }
  37.  
  38.  
  39. /*  error - print message and terminate execution */
  40.  
  41. error (line)
  42. char *line;
  43. {
  44.     remark (line);
  45.     endst();
  46. }
  47.  
  48. /* system error - don't try to close files ! */
  49.  
  50. sys_error (line)
  51. char *line;
  52. {
  53.     remark ("System error in:  ");
  54.     remark (line);
  55.     _exit();
  56. }
  57.  
  58. /*    remark - print error message and continue */
  59.  
  60. remark(line)
  61. char *line;
  62. {
  63.     putlin (line, ERROUT);
  64. }
  65.  
  66. ontinue */
  67.  
  68. remark(line)
  69. char *line;
  70. {
  71.     putlin (line, ERROUT);
  72. }
  73.  
  74. ) {
  75.         return(ERR);
  76.     }
  77.